package com.edu.web.controller;

import com.edu.model.User;
import com.edu.service.IUserService;
import com.edu.web.controller.base.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("user")
public class UserController extends BaseController<User> {
    @Autowired
    private IUserService userService;
    @RequestMapping("find")
    public String find(Integer id) {
        User user = userService.findById(id);
        System.out.println(user);
        return null;
    }
    @RequestMapping("login")
    public String login() {
        return "Default";
    }
    @RequestMapping(MANAGE)
    public String manage() {
        return MANAGE_PAGE;
    }
    @RequestMapping(INFO)
    public String info() {
        return INFO_PAGE;
    }
    @RequestMapping(EDIT)
    public String edit() {
        return EDIT_PAGE;
    }
    @RequestMapping("update")
    public String update() {
        return "user/update";
    }
}
